<template>
    <div class="wx" @tap="copy">
         <text class="tblin_items_txt" selectable="true" v-show="false">{{copytxt}}</text>
        <view class="tblin_items_btn">加微信</view> 
    </div>
</template>
<script>
export default {
  data() {
    return {
      copytxt: "happydourou"
    };
  },
  methods: {
    copy() {
      var that = this;
      wx.setClipboardData({
        data: that.copytxt,
        success: function(res) {
           wx.showToast({
               title: '复制成功!',
               icon: 'success'
           })
        }
      });
    }
  }
};
</script>
<style lang="scss" scoped>
@import "@/styles/varibles.scss";
.wx {
  position: fixed;
  right: 50rpx;
  bottom: 200rpx;
  width: 100rpx;
  height: 100rpx;
  line-height: 100rpx;
  text-align: center;
  display: inline-block;
  border-radius: 50%;
  background: #19af08;
  color: #fff;
  font-size: $fontSize0;
  font-weight: bold;
}
</style>


